package shun.demo.remote.display.model;

import android.os.SystemClock;
import shun.demo.remote.display.client.XScreen;

import java.io.Serializable;
import java.net.Socket;

/**
 * Created by chen on 14-5-9.
 */
public class Property implements Serializable {

    private static final long serialVersionUID = 2L;

    public Property(float mx) {
        mX = mx;
        mTime = SystemClock.uptimeMillis() + XScreen.get().getTimeOffset();
    }

    private float mX;
    private long mTime;
    private transient Socket mFrom;

    public float getX() {
        return mX;
    }

    public void setX(float x) {
        mX = x;
    }

    public long getTime() {
        return mTime;
    }

    public void setTime(long time) {
        mTime = time;
    }

    public Socket getFrom() {
        return mFrom;
    }

    public void setFrom(Socket from) {
        mFrom = from;
    }

    @Override
    public String toString() {
        return "Property{" +
                "mX=" + mX +
                ", mTime=" + mTime +
                ", mFrom=" + mFrom +
                '}';
    }

}
